<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改考题信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-testinfo-edit" th:object="${rmTestinfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">试卷id：</label>
                <div class="col-sm-8">
                    <input name="tid" th:field="*{tid}" class="form-control" type="text" required>
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">考题类型：</label>
                <div class="col-sm-8">
                    <select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('rm_test_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
                    </select>
                   <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">考题题干：</label>
                <div class="col-sm-8">
                    <!--<input name="content" th:field="*{content}" class="form-control" type="text">-->
                    <textarea name="content" maxlength="500" class="form-control" rows="3">[[*{content}]]</textarea>
                    <span  id="tishi"  class="help-block m-b-none hide"><i class="fa fa-info-circle"></i>中华人民共和国诞生于$年。 ($为填空位置)</span>
                </div>
            </div>
            <div class="form-group" id="chooses">
                <label class="col-sm-3 control-label">考题选项：</label>
                <div class="col-sm-8">
                    <!--<input name="chooses" th:field="*{chooses}" class="form-control" type="text">-->
                    <textarea name="chooses" maxlength="500" class="form-control" rows="3">[[*{chooses}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">正确答案：</label>
                <div class="col-sm-8">
                    <input name="anawers" th:field="*{anawers}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:src="@{/self/testedit.js}"></script>
    <script type="text/javascript">
        var prefix = ctx + "self/testinfo";
        $("#form-testinfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-testinfo-edit').serialize());
            }
        }
    </script>
</body>
</html>